package com.gryffonx.Objects.Skills;

/**
 * Skill Value object for WOTC's 3rd Edition player rules.<br>
 * When constructed, it takes the id and correlates it to a record in the skills table in the database.
 * from there, the values like name, description, what ability it is tied to, if it is an untrained skill and
 * if it suffers from an armorcheck penalty. From there is checks the current character class to see if that class
 * can assign it, or if it should incure a rank penalty.<br>
 * <br>
 * After that, it takes the current characters ability modifier, the number of ranks assigned, and any misc mods
 * such as racial mods, and determins the overall score.<br>
 * <br>
 * Jesus, this is going to be a pain...<br>
 *
 * @author Erik Stell
 * @version 1.0
 */
public class SkillObject {
    private String skillName;
    private String description;
    private String keyAbility;
    private int skillModifier; //sum of ability mod, ranks, and misc
    private int ranks;
    private int miscModifier;
    private boolean armorCheckPenalty;
    private boolean untrainedSkill;
    private Object[] availableToClasses; //array of Class Objects

    /**
     * Constructor.  Accepts a charactor object for calculations
     */
    public SkillObject() {

    }

    public String getSkillName() {
        return skillName;
    }

    public void setSkillName(String skillName) {
        this.skillName = skillName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getKeyAbility() {
        return keyAbility;
    }

    public void setKeyAbility(String keyAbility) {
        this.keyAbility = keyAbility;
    }

    public int getSkillModifier() {
        return skillModifier;
    }

    int getAbilityModifier() {
        return this.getRanks() + this.getMiscModifier();
    }

    public void setAbilityModifier(int abilityModifier) {
        int abilityModifier1 = abilityModifier;
    }

    int getRanks() {
        return ranks;
    }

    public void setRanks(int ranks) {
        this.ranks = ranks;
    }

    int getMiscModifier() {
        return miscModifier;
    }

    public void setMiscModifier(int miscModifier) {
        this.miscModifier = miscModifier;
    }

    public boolean isArmorCheckPenalty() {
        return armorCheckPenalty;
    }

    public void setArmorCheckPenalty(boolean armorCheckPenalty) {
        this.armorCheckPenalty = armorCheckPenalty;
    }

    public boolean isUntrainedSkill() {
        return untrainedSkill;
    }

    public void setUntrainedSkill(boolean untrainedSkill) {
        this.untrainedSkill = untrainedSkill;
    }

    public Object[] getAvailableToClasses() {
        return availableToClasses;
    }

    public void setAvailableToClasses(Object[] availableToClasses) {
        this.availableToClasses = availableToClasses;
    }
}
